<script type="text/javascript">

jQuery(document).ready(function($) {
	$(".arrowdown").click(function(){
		$("#header").slideToggle('slow','swing');
		$(".arrowdown").toggleClass('arrowup');
	});

	<?php if(isset($_SESSION['username'])) {  ?>
		$("#header").slideToggle('slow','swing');
		$(".arrowdown").toggleClass('arrowup');
	<?php } ?>	
});


$(function()	{
	$('#mainadvsresults').jScrollPane();
});

</script> 

<div id="top">

	<div id="header">
		<?php  if(!isset($_SESSION['username'])) {?>
		<div style="width:50%;margin:0 auto;overflow:hidden;">
			<div style="float:left;">		
				<form method="POST" action="includes/login_action.php">
					<label>Όν. χρήστη: </label><input type="text" name="username" required>&nbsp;&nbsp;&nbsp;
					<label>Συνθηματικό: </label><input type="password" name="password" required>
					<input type="submit" value="Είσοδος">
				</form>	
			</div>

			<div style="float:left;">
				<a href="portal.php?action=registration"><div id="topmenuli">Εγγραφή</div></a>	
		        <a href="portal.php?action=forgot"><div id="topmenuli">Ξέχασα τον κωδικό</div></a>	
			</div>	
        </div>

		<?php }else { ?>
			<div id="topaccount">
				<label style="margin:0 auto;font-size:18px;"><?php echo $_SESSION['fname']." - ".$_SESSION['lname']; ?> </label>&nbsp;|&nbsp;
				<label><a href="portal.php?action=profile">Ο Λογαριασμός μου</a></label>&nbsp;|&nbsp;
				<label><a href="portal.php?action=showAds">Οι Αγγελίες μου</a></label>&nbsp;|&nbsp;            
				<label><a href="includes/logout.php">Αποσύνδεση</a></label> 
			</div>	
		<?php } ?>	

	</div>	
	<div id="arrowdown" class="arrowdown">	
			&nbsp;
	</div>	
</div>

<center> <a href="portal.php"><img style="" src="images/logo.png"></a> </center>

<div id="topmenu">
	<center>
		<ul>
			<a href="portal.php"><li class="topmenuli">Αρχική</li></a>
			<a href="portal.php?action=company"><li class="topmenuli">Η εταιρία</li></a>
			<a href="portal.php?action=contact"><li class="topmenuli">Επικοινωνία</li></a>
		</ul>
	</center>	
</div>
